const fs = require("fs");
const path = require("path");
import { logger } from "./utils";

export function createModules() {
  // 加载配置
  const modulesPath = path.join(__dirname, "modules.json");
  let moduels;
  try {
    moduels = JSON.parse(fs.readFileSync(modulesPath, "utf8"));
  } catch (err) {
    logger("❌无法加载配置文件:", err.message);
    process.exit(1);
  }
  return moduels;
}

